{% extends "index.html" %}
{% load static %}
{% block title %}Login{% endblock %}
{% block loginform %}
{% load user_filters %}

<!-- Form-->
<div class="form">
  <link rel="stylesheet" href="{% static 'auth_form/css/style.css' %}">
  <div class="form-toggle"></div>
  <div class="form-panel one">
    <div class="form-header">
      <h1>Авторизация</h1>
    </div>
    <div class="form-content">
      {% if form.errors %}
        {% for field in form1 %}
          {% for error in field.errors %}
            <div class="alert alert-danger">{{ error|escape }}</div>
          {% endfor %}
        {% endfor %}
        {% for error in form.non_field_errors %}
          <div class="alert alert-danger">{{ error|escape }}</div>
        {% endfor %}
      {% endif %}

      <form method="post" action="{% url 'users:login' %}">
        {% csrf_token %}
        <div class="form-group">
          <label for="id_username1">Имя пользователя
            
              <span class="required text-danger">*</span>
            
          </label>
          <input type="text" name="username" autofocus autocapitalize="none" autocomplete="username" maxlength="150" required id="id_username1">
        
        </div>
      
        <div class="form-group">
          <label for="id_password">Пароль
            
              <span class="required text-danger">*</span>
            
          </label>
          <input type="password" name="password" autocomplete="current-password" required id="id_password">
        
        </div>
        <div class="form-group">
          <button type="submit" name="btn_login_form">Войти</button>
          <a href="{% url 'users:password_reset' %}" class="btn btn-link">
            Забыли пароль?
          </a>
        </div>
      </form>
    </div>
  </div>


</div>

{% endblock %}
